package com.shenzhen.horselive.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.shenzhen.horselive.R;
import com.shenzhen.horselive.beans.MyCityBean;

import org.jetbrains.annotations.NotNull;

public class MyCityAdapter extends BaseQuickAdapter<MyCityBean.DataBean, BaseViewHolder> {


    public MyCityAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, MyCityBean.DataBean dataBean) {
        baseViewHolder.setText(R.id.tv_name,dataBean.getAreaName());
//        1盈利中 2拍卖中 3已售出 4已回收
        switch (dataBean.getStatus())
        {
            case 1:
                baseViewHolder.setImageResource(R.id.img_state,R.mipmap.ico_mycity_yinglizhi);
                break;
            case 2:
                baseViewHolder.setImageResource(R.id.img_state,R.mipmap.ico_paimaizhong);
                break;
            case 3:
                baseViewHolder.setImageResource(R.id.img_state,R.mipmap.ico_yishouchu);
                break;
            case 4:
                baseViewHolder.setImageResource(R.id.img_state,R.mipmap.ico_yihuishou);
                break;
        }
    }
}
